//
//  UIView+Test.m
//  Test
//
//  Created by 黄博 on 2017/7/31.
//
//

#import "UIView+Test.h"

@implementation UIView (Test)

+ (instancetype)viewFromXIB {
    
    NSString *name=NSStringFromClass(self);
    
    UIView *xibView=[[[NSBundle mainBundle] loadNibNamed:name owner:nil options:nil] firstObject];
    
    if(xibView==nil){
        NSLog(@"CoreXibView：从xib创建视图失败，当前类是：%@",name);
    }
    
    return xibView;
}

@end
